<template>
  <!-- 会员管理首页 -->
  <view class="member-container">
    <Top />
    <Menu />
  </view>
</template>

<script>
import { mapActions, mapState } from "vuex";
import List from "../../components/public/List/index.vue";
import Top from "./components/Top/index.vue";
import Menu from "./components/Menu/index.vue";
export default {
  components: {
    Top,
    Menu,
    List
  },
  data() {
    return {
      searchParams: {},
      list: [],
      finished: false,
      loading: true,
      total: null
    };
  },
  computed: {
    ...mapState({
      home: state => state.member.home
    })
  },
  onPullDownRefresh() {
    this.init();
  },
  onShow() {
    this.init();
  },
  methods: {
    ...mapActions({
      getMembersHome: "getMembersHome"
    }),
    init() {
      this.getMembersHome().finally(res => {
        uni.stopPullDownRefresh();
      });
    }
  }
};
</script>

<style lang="scss">
page {
  background-color: $uni-bg-color-grey;
}
</style>
